/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package au.csiro.nt.psdp.actions.util;

/**
 *
 * @author Administrator
 */
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.text.DateFormat;
import java.util.Date;

/**
 *
 */
public class DateUtils
{
    private static final String TIME_FORMAT_PATTERN = "HH:mm:ss";
    private static final DateFormat TIME_FORMAT = new SimpleDateFormat(TIME_FORMAT_PATTERN);

    public static String getTimeFormat()
    {
        return TIME_FORMAT_PATTERN;
    }

    public static String formatTime(Date dateTime)
    {
        return TIME_FORMAT.format(dateTime);
    }

    public static Date parseTime(String dateTime) throws ParseException
    {
        return TIME_FORMAT.parse(dateTime);
    }
}
